﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Generic.Contract
{
    public abstract class BEGeneric : BusinessEntity
    {
        #region Atributo
        private int _Codigo;
        #endregion

        #region Propriedade
        public int Codigo
        {
            get { return _Codigo; }
            set 
            {
                if (this._Codigo != value)
                {
                    this.SendPropertyChanging();
                    _Codigo = value;
                    this.SendPropertyChanged("Codigo");
                }
            }
        } 
        #endregion

        #region Métodos Override
        public override bool Equals(object obj)
        {
            return ((BEGeneric)obj).Codigo == this.Codigo;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        #endregion
    }
}
